<?php
$table_source = $old_nav_db_config['DB_PREFIX'].'sys_conf';
$table_target = $db_config['DB_PREFIX'].'sys_conf';

showjsmessage("开始转换数据表　sys_conf",2);

$names = array('SHOP_LOGO','WATER_IMAGE','WATER_POSITION','WATER_MARK','SMTP_ACCOUNT','MSN_SERVICES','QQ_SERVICES','PAGE_BOTTOM','FOOT_LOGO','TEL','ALL_CITY','GOOGLE_MAP_KEY','INDEX_ALL','BLOG','QQ','EAMIL','TEL_FW','HELP_LINK','WB');

foreach($names as $name)
{
	$val = $db_source->query("SELECT val FROM $table_source WHERE name = '$name'");
	if(count($val) > 0)
	{
		$val = $val[0]['val'];
		$val = preg_replace("/^\/Public/", '/public', $val);
		$db_target->query("UPDATE $table_target SET val = '$val' WHERE name = '$name'");
	}
}

showjsmessage("转换数据表　sys_conf ... 成功");

showjsmessage(U('Index/convert',array('table'=>'user','begin'=>0)),5);
?>